﻿<%@ WebHandler Language="C#" Class="CancelOrder" %>

using System;
using System.Web;

public class CancelOrder : AdminHandler
{
    public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        if (IsAuthenticate(context))
        {
            try
            {
                int oi = 0;
                if (context.Request.QueryString["oi"] != null)
                    oi = int.Parse(context.Request.QueryString["oi"].ToString());


                string ret = new Order().Cancel(oi);
                context.Response.Write("OK");
            }
            catch (Exception ex)
            {
                PMSA.Framework.Log.CLogManager.Write("CancelOrder.ashx", ex.ToString(), "ADMIN");
                context.Response.Write("FAIL");
            }
        }
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}